class Share():
    def __init__(self,name,location = None):
        """"constructor"""
        self.name = name
        self.location = location
        self.automount = True
        # //bandoine.hd.free.fr/home-laptop/plop
        self.service = ""
        self.share = ""
        self.mount_point = ""
        self.workgroup = ""
        self.autentication = None
        self.protocol = ""
        self.options = []
        self.latency = ""
        
    def get_server(self):
        try:
            server = self.service.split('/')[2]
        except:
            server = ""
        return server
    
if __name__ == "__main__":
    share = Share("test")
    share.service = "//bandoine.hd.free.fr/home-laptop/plop"
    print share.get_server()